<template>
  <div class="mx-container">
    <zz-sub-nav :list="list" :index.sync="index">
      <div class="sub-nav-content">
        <div>
          <div class="details-title">{{$t('zz.application_scenarios')}}</div>
          <zz-card>
            <span slot="title">{{$t('zz.basics.idc.advantage.1.title')}}</span>
            <p slot="content">{{$t('zz.basics.idc.advantage.1.des')}}</p>
            <img
              src="@/assets/img/appSecurity/appSecurity1-1.png"
              slot="img"
              alt=""
              width="320"
            />
          </zz-card>
        </div>
        <div >
          <div class="details-title">{{$t('zz.product_superiority')}}</div>
          <div class="card-wrap">
            <div class="t-card">
              <div class="t-heard"><i class="iconfont icon-Setup"></i></div>
              <h5 class="t-title">{{$t('zz.basics.idc.advantage.1.title')}}</h5>
              <p>{{$t('zz.basics.idc.advantage.1.des')}}</p>
            </div>
            <div class="t-card">
              <div class="t-heard"><i class="iconfont icon-weihu"></i></div>
              <h5 class="t-title">{{$t('zz.basics.idc.advantage.2.title')}}</h5>
              <p>{{$t('zz.basics.idc.advantage.2.des')}}</p>
            </div>
            <div class="t-card">
              <div class="t-heard"><i class="iconfont icon-serve"></i></div>
              <h5 class="t-title">{{$t('zz.basics.idc.advantage.3.title')}}</h5>
              <p>{{$t('zz.basics.idc.advantage.3.des')}}</p>
            </div>
            <div class="t-card">
              <div class="t-heard"><i class="iconfont icon-dingwei"></i></div>
              <h5 class="t-title">{{$t('zz.basics.idc.advantage.4.title')}}</h5>
              <p>{{$t('zz.basics.idc.advantage.4.des')}}</p>
            </div>
            <div class="t-card">
              <div class="t-heard"><i class="iconfont icon-team"></i></div>
              <h5 class="t-title">{{$t('zz.basics.idc.advantage.5.title')}}</h5>
              <p>{{$t('zz.basics.idc.advantage.5.des')}}</p>
            </div>
          </div>
        </div>
      </div>
    </zz-sub-nav>
  </div>
</template>

<script>
import SubNav from "@/components/SubNav/index.vue";
import ZzCard from "@/components/ZzCard";

export default {
  data() {
    return {
      index: 1,
      subIndex: 1,
      height: 230,
      titleSize: 20,
      
    };
  },

  components: {
    "zz-sub-nav": SubNav,
    ZzCard,
  },
  props: {},
  mounted() {},
  computed: {
    activeItem: function () {
      let activeItem = this.list.find(v=>v.index == this.index)
      console.log(this.list[this.index])
      this.subIndex = activeItem.child ? activeItem.child[0].index : 1
      return activeItem;
    },
    list: function(){ return [
        { name: this.$t('zz.product_presentation'), index: 1, title: this.$t('zz.product_presentation') },
        { name: this.$t('zz.product_superiority'), index: 2, title: this.$t('zz.product_superiority') },
      ]
    }
  },
  watch: {},
  methods: {
    navClick(a_item) {
      console.log(a_item)
      this.subIndex = a_item.index;
    },
  },
  destroyed() {},
};
</script>
<style lang='scss' scoped>
@import "@/style/variables.scss";

.sub-nav-content {
  padding: 12px 48px;
  flex: 1;
  width: 100%;
  .pro-title {
    color: $color;
    font-size: 20px;
    padding: 20px 45px;
    border-bottom: 1px solid $border;
  }
  .pro-intro-wrap {
    padding: 30px 48px;
  }
  img {
  }
  & > ul {
    width: auto;
    margin: 0 auto;
  }
}

.card-wrap:after{visibility:hidden;display:block;font-size:0;content: " ";clear:both;height:0;}   
.card-wrap{*zoom:1;} 
.t-card{
  width: 17.5%;
  float: left;
  text-align: center;
  margin-right: 2.5%;
  .t-heard{
    i{
      font-size: 40px;
      color: $primary;
    }
    
  }
  .t-title{
    font-size: 16px;
    margin: 10px 0 20px;
  }
  p{

  }
  &:last-child{
    margin-right: 0;
  }
}

@media screen and (max-width:768px) {
  .t-card{
    width: 48%;
    margin-right: 0%;
    margin-bottom: .3rem;
    &:nth-child(2n+1){
      margin-right: 2.5%;
    }
  }
}

</style>